package com.eight.cloud.core.utils.quick;


import com.eight.cloud.core.KeyValue;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
 * @ClassName: CollectionUtils
 * @Author: TXC
 * @Date: 2025-08-08 09:58
 **/
public class CollectionUtils {
    public static <K, V> List<KeyValue<K, V>> convertList(Set<Map.Entry<K, V>> map, Function<Map.Entry<K, V>, KeyValue<K, V>> function) {
        return map.stream().map(function).collect(Collectors.toList());
    }
}
